<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app">
        <input type="text" placeholder="请输入今天要干嘛" v-model="msg">
        <button v-on:click="handleC">add</button>
        <ul>
            <li v-for="item in items">
                {{item}}
            </li>
        </ul>
    </div>
</body>
<script>
    var vm =  new Vue({
        el:"#app",
        data:{
            msg:"",
            items:[]
        },
        methods:{
            handleC(){
                this.items.push(this.msg);
                this.msg="";
            }
        }
    })
</script>
</html>